<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="common/head.jsp" %>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
  <head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="Content-Style-Type" content="text/css">
	<meta http-equiv="Content-Script-Type" content="text/javascript">
	<title>化学分子式详情</title>
	<link rel="stylesheet" href="common/css/version4.css" type="text/css">
	<link rel="stylesheet" href="common/css/import.css" type="text/css" media="screen,print">
	<link rel="stylesheet" href="common/css/jquery-ui.css" type="text/css">
	<script src="common/js/jquery.js" type="text/javascript"></script>
	<script src="common/js/jquery-ui.js" type="text/javascript"></script>
	<script type="text/javascript" src="common/js/common.js"></script>
  </head>

  <body id="catalog">
	<div class="topHeader">
  <div class="wrap960">
		<!-- 快速链接 S-->
    	<ul class="sg_tits2 fr">
			<li class="noPadd"><a href="javascript:void(0)" onclick="SetHome(this,'http://localhost/chemSearch/');" target="_self">加入收藏</a></li>
		</ul>
<%  
	
	if(session.getAttribute("userLogin")==null){ %>
		<div class="fl" id="loginF">
			<span class="welcome2">用户快速登陆</span>
			<!-- 选择去向 S-->
			<div class="hasGone">
				<form method="post" target="_self" name="login_form" id="login_form" action="#">
				<!-- 登录前显示、登录后隐藏 S-->
				<div class="fl">
					<input class="inp2 w100 colGray" name="user" id="login_user" value="用户名" onfocus="if(this.value == '用户名'){this.value = '';$(this).removeClass('colGray');}" onblur="if(this.value == ''){this.value = '用户名';$(this).addClass('colGray');}" type="text">

                    <input style="display: block;" class="inp2 w85 colGray jsclass_pw_t" value="请输入密码" type="text">
                    <input class="inp2 w85 colGray jsclass_pw_p" name="pwd" id="login_pwd" style="display: none;" type="password">
                    
					<input name="method" value="checktop" type="hidden">
					<input name="returnUrl" id="returnUrl" value="" type="hidden">
					<input name="sign" value="s" type="hidden">
					<input style="display: none;" id="submit" type="submit">
				</div>
				<a href="javascript:void(0);" class="hbtnA" onclick="login();" target="_self" id="btn_login">登录</a>
			    </form>
		  </div>
			<!-- 选择去向 E-->
		</div>
<%}
	else {%>
		<!-- 登陆后状态 S-->
		<div class="fl" id="loginL">
			<!-- 登陆后 -->
			<span class="welcome2" id="welcomeText">您好，欢迎使用化学结构式检索系统</span>
			<!-- 选择去向 S-->
			<div class="hasGone">
			<form name="Form2" action="${pageContext.request.contextPath}/manage/user/loginOut.do">
				<input type="submit" class="hbtnA" id="logoutBtn" value="退出"/>	  
				<input type= "hidden" name= "url" id= "url" value= "<%=request.getRequestURL()%>">
			</form> 
			</div>
			<!-- 选择去向 E-->
		</div>
	<%}
%>

 </div>
</div>
	<div id="wrapper">
	    <!-- Header Start -->
	<div id="header">
	<a href="#"><img src="${ctx }/common/images/logo1.gif" ></a>
	</div>
	<div id="nav">
    	<a href="${ctx }/search.jsp" class="nav">化合物综合检索</a>  |  
    	<a href="${ctx }/structure_search.jsp" class="nav">化合物结构式检索</a>  |  
        <a href="${ctx }/name_search.jsp" class="nav">化合物名称检索</a>  |  
        <a href="${ctx }/cas_search.jsp" class="nav">CAS号检索</a>  |  
        <a href="${ctx }/formula_search.jsp" class="nav">分子式检索</a>
    </div>

	<div id="main">
	<script language="javascript"> 
		function validate()
		{	
			if(document.frmQuery.cas.value=="")
			{
				window.alert("请输入CAS号！");
				return false;
			}
			else {
				if(document.all.jqjs.checked)  
				{  
					document.frmQuery.action="${ctx }/search/cas_search.do?type=1";
				}  
				else if(document.all.mhjs.checked)  
				{  
					document.frmQuery.action="${ctx }/search/cas_search.do?type=2";
				}
		}
			document.frmQuery.submit();
		}
	</script>
	
	  <h1>CAS号检索</h1>
	  <h2>请在输入框内输入化合物CAS号进行检索！</h2><br />  
	    <div id="content">
	    <div align="center">
		  <form name=frmQuery method=post>
	    	<table border=0 cellspacing=0 width="40%" align=center>
	        <tr>
	        <td>
	        <p align="center"><h2>CAS号:
	        <INPUT name=cas size="29" style="WIDTH: 200px; HEIGHT: 22px"></h2>
	        <br><br>
	        <input type="radio" value="jq" checked name="jqmh" id="jqjs">精确检索      
	        <input type="radio" name="jqmh" value="mh" id="mhjs">模糊检索</p>
	        <p align=center>
	        <input type=submit value="提交检索" id=submit1 name=submit1 onClick="return validate();">
	        </p>
	        </td>
	        </tr>
	        </table>
	      </form>
	        <table border=0 cellspacing=0 width="40%" align=center>
	        <tr>
	        <td><h2>新用户小贴士：</h2></td>
	        </tr>
	        <tr>
	        <td><h2>(1) 名称的输入，例如 <font color=red>ethanol,  乙醇 </font>.</h2></td>
	        </tr>
	        <tr>
	        <td><h2>(2) 分子式中下标直接输入，例如 <font color=red>C2H6O </font>.</h2></td>
	        </tr>
	        </table>
	     </div>
	     </div>
	    </div>
	  </body>
</html>